/*
 * File: J_la_T05_q2.c
 *
 * MATLAB Coder version            : 5.2
 * C/C++ source code generated on  : 23-Apr-2025 08:37:14
 */

/* Include Files */
#include "J_la_T05_q2.h"
#include <math.h>

/* Function Definitions */
/*
 * J_LA_T05_Q2
 *     U52 = J_LA_T05_Q2(IN1,IN2)
 *
 * Arguments    : const double in1[5]
 *                const double in2[5]
 *                double u52[16]
 * Return Type  : void
 */
void J_la_T05_q2(const double in1[5], const double in2[5], double u52[16])
{
  double t10;
  double t105;
  double t11;
  double t12;
  double t13;
  double t14;
  double t15;
  double t16;
  double t17;
  double t18;
  double t19;
  double t2;
  double t20;
  double t21;
  double t22;
  double t23;
  double t24;
  double t26;
  double t28;
  double t29;
  double t3;
  double t33;
  double t34;
  double t36;
  double t4;
  double t42;
  double t43;
  double t47_tmp;
  double t5;
  double t53;
  double t56;
  double t6;
  double t7;
  double t76;
  double t8;
  double t84;
  double t85;
  double t9;
  /*     This function was generated by the Symbolic Math Toolbox version 8.7.
   */
  /*     09-Apr-2025 18:11:45 */
  t2 = cos(in2[0]);
  t3 = cos(in2[1]);
  t4 = cos(in2[2]);
  t5 = cos(in2[3]);
  t6 = cos(in2[4]);
  t7 = cos(in1[0]);
  t8 = cos(in1[1]);
  t9 = cos(in1[2]);
  t10 = cos(in1[3]);
  t11 = cos(in1[4]);
  t12 = sin(in2[0]);
  t13 = sin(in2[1]);
  t14 = sin(in2[2]);
  t15 = sin(in2[3]);
  t16 = sin(in2[4]);
  t17 = sin(in1[0]);
  t18 = sin(in1[1]);
  t19 = sin(in1[2]);
  t20 = sin(in1[3]);
  t21 = sin(in1[4]);
  t22 = t7 * t8;
  t23 = t7 * t18;
  t105 = t2 * t8;
  t24 = t105 * t13;
  t26 = t3 * t8 * t17;
  t7 = t8 * t12;
  t28 = t7 * t13;
  t29 = t2 * t17 * t18;
  t33 = t12 * t17 * t18;
  t85 = t2 * t3;
  t34 = t85 * t22;
  t8 = t3 * t12;
  t36 = t8 * t22;
  t42 = t23 + t26;
  t43 = t22 + -(t3 * t17 * t18);
  t53 = (t2 * t13 * t18 + t7 * t17) + t8 * t23;
  t3 = (t24 + t36) + -t33;
  t56 = (t105 * t17 + t85 * t23) + -(t12 * t13 * t18);
  t47_tmp = t5 * t14;
  t2 = (t28 + t29) + -t34;
  t7 = t4 * t19;
  t12 = t9 * t42 + t7 * t43;
  t8 = t4 * t9;
  t18 = t19 * t3 + t8 * t53;
  t76 = t19 * t42 + -(t8 * t43);
  t84 = t9 * t2 + t7 * t56;
  t85 = t9 * t3 + -(t7 * t53);
  t17 = t19 * t2 + -(t8 * t56);
  t4 = t47_tmp * t53 + t15 * t18;
  t7 = t10 * t14 * t15;
  t8 = t5 * t10;
  t42 = (t7 * t43 + t20 * t12) + t8 * t76;
  t22 = t14 * t15 * t20;
  t3 = t5 * t20;
  t12 = (t22 * t43 + -(t10 * t12)) + t3 * t76;
  t13 = (-(t7 * t53) + t8 * t18) + t20 * t85;
  t105 = (t22 * t53 + t10 * t85) + -(t3 * t18);
  t85 = (t7 * t56 + t20 * t84) + t8 * t17;
  t3 = (t22 * t56 + -(t10 * t84)) + t3 * t17;
  t22 = t6 * t21;
  t2 = t16 * t21;
  t8 = t47_tmp * t43 - t15 * t76;
  u52[0] = (t11 * t12 + t22 * t42) + t2 * t8;
  t7 = t47_tmp * t56 - t15 * t17;
  u52[1] = (t11 * t3 + t22 * t85) + t2 * t7;
  u52[2] = (t11 * t105 - t22 * t13) + t2 * t4;
  u52[3] = 0.0;
  t22 = t6 * t11;
  t2 = t11 * t16;
  u52[4] = (-t21 * t12 + t22 * t42) + t2 * t8;
  u52[5] = (-t21 * t3 + t22 * t85) + t2 * t7;
  u52[6] = (-t21 * t105 - t22 * t13) + t2 * t4;
  u52[7] = 0.0;
  t22 = t6 * t8;
  u52[8] = -t16 * t42 + t22;
  t2 = t6 * t7;
  u52[9] = -t16 * t85 + t2;
  t8 = t6 * t4;
  t7 = t16 * t13;
  u52[10] = t8 + t7;
  u52[11] = 0.0;
  u52[12] = (((t23 * -0.01491 - t26 * 0.01491) + t14 * t43 * 0.27898) -
             t16 * t42 * 0.1085) +
            t22 * 0.1085;
  u52[13] = ((((t28 * -0.01491 - t29 * 0.01491) + t34 * 0.01491) +
              t14 * t56 * 0.27898) -
             t16 * t85 * 0.1085) +
            t2 * 0.1085;
  u52[14] = ((((t24 * 0.01491 - t33 * 0.01491) + t36 * 0.01491) +
              t14 * t53 * 0.27898) +
             t8 * 0.1085) +
            t7 * 0.1085;
  u52[15] = 0.0;
}

/*
 * File trailer for J_la_T05_q2.c
 *
 * [EOF]
 */
